#! /usr/bin/env python 
#coding=utf-8
"""
 数据库连接的的工具
"""
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker


Base = declarative_base()
engine = create_engine('postgresql://postgres:root@127.0.0.1:5432/postgres',echo=True,
                       pool_size=5,pool_timeout=30)
DBsession = sessionmaker(bind=engine)
session = DBsession()


